<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:composite="http://java.sun.com/jsf/composite">
<h:head>
	<title>filterText</title>
</h:head>
<h:body>
	<composite:interface>
		<composite:attribute name="id" />
		<composite:attribute name="size" default="" />
		<composite:attribute name="filterBy" required="true" />
		<composite:attribute name="defaultFilter" default="null" />
		<composite:attribute name="label" default="" />
		<composite:attribute name="betweenLabel" default="" />
		<composite:attribute name="caseSensitiveLabel" default="" />
		<composite:attribute name="showOperator" default="false" />
		<composite:attribute name="showCaseSensitive" default="false" />


	</composite:interface>
	<composite:implementation>
		<h:panelGrid id="#{cc.attrs.id}" columns="5" cellspacing="5px">

			<h:outputLabel for="#{cc.attrs.id}Value" value="#{cc.attrs.label}" />
			
			<p:selectOneMenu id="#{cc.attrs.id}Operator" rendered="#{cc.attrs.showOperator}"
				value="#{searchHelper.filtersMap[cc.attrs.filterBy].operator}" style="diplay:inline !important;paddin:100px !important;">
				<f:selectItems value="#{searchHelper.types}" var="filterType" itemLabel="#{text[searchHelper.filtersMap[cc.attrs.filterBy].operator]}"/>
			</p:selectOneMenu>

			<p:inputText id="#{cc.attrs.id}Value"
				value="#{searchHelper.filtersMap[cc.attrs.filterBy].value}"
				size="#{cc.attrs.size}" />

			<p:outputPanel id="#{cc.attrs.id}FinalValueWrapper" layout="inline">
				<h:outputLabel for="#{cc.attrs.id}FinalValue"
					value="#{cc.attrs.betweenLabel}" />
				<p:spacer width="10px"/>
				<p:inputText id="#{cc.attrs.id}FinalValue"
					value="#{searchHelper.filtersMap[cc.attrs.filterBy].finalValue}"
					size="#{cc.attrs.size}" />
			</p:outputPanel>


			<p:outputPanel id="#{cc.attrs.id}CaseSensitiveWrapper" layout="inline" rendered="#{cc.attrs.showCaseSensitive}">
				<h:selectBooleanCheckbox id="#{cc.attrs.id}CaseSensitive"
					value="#{searchHelper.filtersMap[cc.attrs.filterBy].isCaseSensitive}" />
				<h:outputLabel for="#{cc.attrs.id}CaseSensitive"
					value="#{cc.attrs.caseSensitiveLabel}" />
			</p:outputPanel>
		</h:panelGrid>
	</composite:implementation>
</h:body>
</html>